package com.s59.controller;

import com.s59.Service.BookService;
import com.s59.dao.BookDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/book")
public class BookController {

    @Autowired
    private BookService bookService;

    @GetMapping("/cache")
    public boolean cacheBook() {
        return bookService.cacheBook();
    }

    @GetMapping("/chear")
    public boolean chearBook() {
        return bookService.chearBook();
    }
}